/*
 * hookstub.s
 * bbinj
 *
 * Created by msftguy on 6/20/10.
 * Copyright 2010 __MyCompanyName__. All rights reserved.
 */

.text
.arm

.globl _my_at_cmd_handler

_my_at_cmd_handler:
				push	{r0-r3, r7, lr}
				add		r7, sp, #16
				bl		_my_C_at_cmd_handler
				cmp		r0,	#0
				beq		skip_orig
				pop		{r0-r3, r7, lr}
				ldr		r12, p_at_cmd_handler_call_orig
pcrel1:			add		r12, pc, r12
				ldr		pc, [r12]
skip_orig:		pop		{r0-r3, r7, pc}


p_at_cmd_handler_call_orig:
				.word	_at_cmd_handler_call_orig - pcrel1 - 8
				
.data
.globl _at_cmd_handler_call_orig
_at_cmd_handler_call_orig:
				.word	0
				

